<div class="fornecedores index">
	<h2><?php __('Fornecedores');?></h2>
	
	<?php echo $this->Html->link(__('Novo Fornecedor', true), array('action' => 'add'), array('class'=>'texto')); ?>
	<br><br>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('ID', 'id_fornecedor');?></th>
			<th><?php echo $this->Paginator->sort('Razão Social', 'razao_social');?></th>
			<th><?php echo $this->Paginator->sort('CNPJ');?></th>
			<th><?php echo $this->Paginator->sort('Contato', 'contato');?></th>
			<th class="actions">Opções</th>
	</tr>
	<?php
	$i = 0;
	foreach ($fornecedores as $fornecedore):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="odd"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $fornecedore['Fornecedore']['id_fornecedor']; ?>&nbsp;</td>
		<td><?php echo $fornecedore['Fornecedore']['razao_social']; ?>&nbsp;</td>
		<td><?php echo $fornecedore['Fornecedore']['CNPJ']; ?>&nbsp;</td>
		<td><?php echo $fornecedore['Fornecedore']['contato']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Editar', true), array('action' => 'edit', $fornecedore['Fornecedore']['id_fornecedor'])); ?>
			<?php echo $this->Html->link(__('Apagar', true), array('action' => 'delete', $fornecedore['Fornecedore']['id_fornecedor']), null, sprintf(__('Deseja apagar %s?', true), $fornecedore['Fornecedore']['razao_social'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>

	<?php if($this->Paginator->numbers()){?>
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Próximo', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	<?php } ?>
</div>
